﻿@model ICollection<AuthenticationClientData>

@if (Model.Count != 0)
{
    using (Html.BeginForm("ExternalLogin", "Auth", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post))
    {
        @Html.AntiForgeryToken()

        foreach (var p in Model)
        {
            <div class="login-wrap">
                @if (p.AuthenticationClient.ProviderName == "facebook")
                {
                    <div class="metro double-size navy-blue ">
                        <a href="#" class="social-link">
                            <i class="icon-facebook-sign"></i>
                            <span>Facebook Login</span>
                        </a>
                        <button type="submit" style="display: none" name="provider" value="@p.AuthenticationClient.ProviderName" 
                            title="Log in using your @p.DisplayName account">@p.DisplayName</button>
                    </div>        
                }

                @if (p.AuthenticationClient.ProviderName == "twitter")
                {
                    <div class="metro double-size blue">
                        <a href="#" class="social-link">
                            <i class="icon-twitter-sign"></i>
                            <span>Twitter Login</span>
                        </a>
                        <button type="submit" style="display: none"  name="provider" value="@p.AuthenticationClient.ProviderName" 
                            title="Log in using your @p.DisplayName account">@p.DisplayName</button>
                    </div>     
                }
            </div>
        }
    }
}